package com.techsoft.executor;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.techsoft.DBException;
import com.techsoft.DataExecutor;
import com.techsoft.MetaData;
import com.techsoft.SQLParam;

public class MysqlExecutor implements DataExecutor {
	private static final Logger Log = LoggerFactory
			.getLogger(MysqlExecutor.class);
	private static MysqlExecutor instance;

	public MysqlExecutor() {

	}

	public static DataExecutor getInstance() {
		if (instance == null) {
			instance = new MysqlExecutor();
		}

		return instance;
	}

	@Override
	public void setParam(SQLParam param, CallableStatement executor,
			Connection conn) throws DBException {
		Log.info("info");
	}

	@Override
	public List<Map<String, Object>> serializeResultSet(ResultSet rs,
			Connection conn) throws DBException {
		return null;
	}

	@Override
	public void getParam(SQLParam param, CallableStatement executor,
			Connection conn) throws DBException {

	}

	@Override
	public List<MetaData> queryMetaData(String sql, boolean isCursor,
			Connection conn) throws DBException {
		return null;
	}

	@Override
	public List<Map<String, Object>> queryData(String sql, boolean isCursor,
			List<SQLParam> params, Connection conn) throws DBException {
		return null;
	}

	@Override
	public Map<String, Object> saveData(String sql, List<SQLParam> params,
			Connection conn) throws DBException {
		return null;
	}

	@Override
	public List<Map<String, Object>> queryDataByPage(String sql,
			boolean isCursor, Integer pageNumber, Integer pageSize,
			List<SQLParam> params, Connection conn) throws DBException {
		return null;
	}

	@Override
	public Map<String,Object> queryParams(String sql, Connection conn)
			throws DBException {
		return null;
	}

	@Override
	public Integer queryRecordCount(String querysql, List<SQLParam> params,
			Connection conn) throws DBException {
		return null;
	}
}
